using System;
using System.Threading;

using Gtk;

using stefc.geo.platform;

namespace MyLocate
{
	class MainClass
	{
		public static void Main (string[] args)
		{
			Application.Init ();
			MainWindow win = new MainWindow ();
			win.Show ();
			
			var gps = PlatformManager.Instance.GetGPSSensor(5);
			gps.Out_GPSFix +=  win.In_GPSFix;
			
			var thread = new Thread( x => gps.In_Start() );
			thread.Start();
			
			Application.Run ();
			
			gps.In_Stop();
			
			thread.Abort();
		}
	}
}
